package com.cai.oamanager.service.impl;

import com.cai.oamanager.dao.LeaveDao;
import com.cai.oamanager.entity.Leave;
import com.cai.oamanager.service.LeaveSevice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @author：蔡松坡
 * @date：2021/3/2 16 : 47
 * @package：com.cai.oamanager.service.impl
 */
@Service
public class LeaveSeviceImpl implements LeaveSevice {

    @Autowired
    private LeaveDao leaveDao;

    @Override
    public List<Leave> getAllLeave(Integer stuId, Integer start, Integer size) {
        return leaveDao.getAllLeave(stuId,start,size);
    }

    @Override
    public void addLeave(Leave leave) {
        leaveDao.addLeave(leave );
    }

    @Override
    public int getLeaveCount(Integer stuId) {
        return leaveDao.getLeaveCount(stuId);
    }

    @Override
    public List<Leave> getLeaves(String pid) {
        return leaveDao.getLeaves(pid);
    }

    @Override
    public void instructorApproved(Integer leid,Integer sta) {
        leaveDao.instructorApproved(leid,sta);
    }
}
